home *** CD-ROM | disk | FTP | other *** search
/ Animation How-To / Animation How-to CD.iso / PLY / CHAPTER3 / ROCKY / README < prev    next >
Text File  |  1994-01-01  |  2KB  |  63 lines

  1. The Rocking color data files map shifting textures onto a sphere.
  2.  
  3. Added here is RAINBOW.PI, which shows a shifting texture mapped onto a 
  4. flat surface.  
  5.  
  6. Several additional examples of sphere animations besides the one described 
  7. in the text have been included in the FLY directory, but their data files 
  8. have long ago dissipated as random heat into the endless void of space. 
  9. In other words, I can't find them anywhere <g>.  There are several additional
  10. examples to help you find them, and make up your own.
  11.  
  12. You will probably want to try varying:
  13.  
  14. // Camera
  15. viewpoint {
  16.    from <300,200,-250>
  17.    at <0,0,0>
  18.    up <0,1,0>
  19.    angle 120      <===============this (i.e. angle 90 + 30*sin(phz*rad) )
  20.    aspect 1.433
  21.    resolution 320,200
  22.    }
  23.  
  24. define color_phase
  25. texture {
  26.    noise surface {
  27.       color white
  28.       position_fn position_spherical  <============This (0,1,2,3,4,5)
  29.       lookup_fn lookup_ramp           <============This (0,1,2,3)
  30.       octaves 1                       <============This (0,1,2,3,4,5)
  31.       turbulence 1.5+0.5*sin(phz*rad) <============This (any weird function)
  32.       ambient 0.2
  33.       diffuse 0.8
  34.       specular 0.3
  35.       microfacet Reitz 5
  36.       color_map(
  37.       [0.000, 0.033, <a00, b00, c00>, <a01, b01, c01> ]
  38.       [0.033, 0.067, <a01, b01, c01>, <a02, b02, c02> ]
  39.       [0.933, 0.967, <a28, b28, c28>, <a29, b29, c29> ]
  40.       ...
  41.  
  42.       [0.967, 1.000, <a29, b29, c29>, <a00, b00, c00> ])
  43.          }
  44.    scale <100,100,100>    <========================This (try a tri-phase)
  45. }
  46.  
  47. define tx 100*sin(phz*rad)   <---|
  48. define ty 50*sin(phz*rad)        |---These
  49. define tz 100*sin(phz*rad)   <---|
  50.  
  51. // Create a volume
  52. object {
  53.    sphere <0,0,0>, 540  <=== and this guy
  54.    color_phase
  55.    translate <tx,ty,tz>
  56.    }
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.